<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default filesystem disk that should be used
    | by the framework. The "local" disk, as well as a variety of cloud
    | based disks are available to your application. Just store away!
    |
    */

    'default' => env('FILESYSTEM_DISK', 'local'),

    /*
    |--------------------------------------------------------------------------
    | Filesystem Disks
    |--------------------------------------------------------------------------
    |
    | Here you may configure as many filesystem "disks" as you wish, and you
    | may even configure multiple disks of the same driver. Defaults have
    | been set up for each driver as an example of the required values.
    |
    | Supported Drivers: "local", "ftp", "sftp", "s3"
    |
    */

    'disks' => [

        'local' => [
            'driver' => 'local',
            'root'   => storage_path('app'),
            'url'    => env('APP_URL') . '/storage',
            'visibility' => 'public',
            'throw'  => false,
        ],

        'public' => [
            'driver'     => 'local',
            'root'       => storage_path('app/public'),
            'url'        => env('APP_URL') . '/storage',
            'visibility' => 'public',
            'throw'      => false,
        ],

        's3' => [
            'driver'                  => 's3',
            'key'                     => env('AWS_ACCESS_KEY_ID'),
            'secret'                  => env('AWS_SECRET_ACCESS_KEY'),
            'region'                  => env('AWS_DEFAULT_REGION'),
            'bucket'                  => env('AWS_BUCKET'),
            'url'                     => env('AWS_URL'),
            'endpoint'                => env('AWS_ENDPOINT'),
            'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
            'throw'                   => false,
        ],

        'aliyunoss' => [
            'driver' => 'oss',
            'access_key_id' => env('ALIYUN_ACCESS_ID'),           // Required, YourAccessKeyId
            'access_key_secret' => env('ALIYUN_ACCESS_KEY'),       // Required, YourAccessKeySecret
            'bucket' => env('ALIYUN_BUCKET'),                  // Required, For example: my-bucket
            'endpoint' => env('ALIYUN_ENDPOINT'),                // Required, For example: oss-cn-shanghai.aliyuncs.com
            'internal' => env('OSS_INTERNAL', null),          // Optional, For example: oss-cn-shanghai-internal.aliyuncs.com
            'domain' => env('ALIYUN_ENDPOINT', null),            // Optional, For example: oss.my-domain.com
            'is_cname' => env('ALIYUN_IS_CNAME', false),            // Optional, if the Endpoint is a custom domain name, this must be true, see: https://github.com/aliyun/aliyun-oss-php-sdk/blob/572d0f8e099e8630ae7139ed3fdedb926c7a760f/src/OSS/OssClient.php#L113C1-L122C78
            'prefix' => env('OSS_PREFIX', ''),              // Optional, The prefix of the store path
            'use_ssl' => env('ALIYUN_SSL', true),              // Optional, Whether to use HTTPS
            'reverse_proxy' => env('OSS_REVERSE_PROXY', false),    // Optional, Whether to use the Reverse proxy, such as nginx
            'throw' => env('OSS_THROW', false),            // Optional, Whether to throw an exception that causes an error
            'options' => [],                                 // Optional, Add global configuration parameters, For example: [\OSS\OssClient::OSS_CHECK_MD5 => false]
            'macros' => []                                  // Optional, Add custom Macro, For example: [\App\Macros\ListBuckets::class, \App\Macros\CreateBucket::class]
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Symbolic Links
    |--------------------------------------------------------------------------
    |
    | Here you may configure the symbolic links that will be created when the
    | `storage:link` Artisan command is executed. The array keys should be
    | the locations of the links and the values should be their targets.
    |
    */

    'links' => [
        public_path('storage') => storage_path('app/public'),
    ],

];
